// UsesVarTable.h : stores the statement and procedures which use each variable.
// Author: Achyut P Balaji
//

#ifndef USES_VAR_TABLE_H
#define USES_VAR_TABLE_H
#include"../../SPA_Data_Types.h"

using namespace std;


class UsesVarTable {
private:

	vector<PROC_LIST> procUsedIn;

	static UsesVarTable *obj;
	UsesVarTable();

public:

	static UsesVarTable* getInstance();
	static UsesVarTable* getFirstInstance();

	BOOLEAN addProc(VAR_INDEX v, PROC_INDEX p);

	BOOLEAN isUsed(PROC_INDEX n, VAR_INDEX ind);

	PROC_LIST* getProcUsedIn(VAR_INDEX v);

	void initialise(int size);

};
#endif